package com.sq.util;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author sq
 *
 */
public class ClassUtil {
    public static boolean isDate(Class<?> cls) {
        return cls.equals(Date.class) || cls.equals(LocalDate.class);
    }

    public static boolean isDateTime(Class<?> cls) {
        return cls.equals(Date.class) || cls.equals(LocalDateTime.class);
    }

    public static boolean isDouble(Class<?> cls) {
        return cls.equals(double.class) || cls.equals(Double.class);
    }

    public static boolean isLong(Class<?> cls) {
        return cls.equals(long.class) || cls.equals(Long.class);
    }

    public static boolean isInt(Class<?> cls) {
        return cls.equals(int.class) || cls.equals(Integer.class);
    }

    public static boolean isString(Class<?> cls) {
        return cls.equals(String.class);
    }
}
